package BehaviorDesignPattern.MediatorPattern;

// 具体组件2
class Component2 extends Component {
    public Component2(Mediator mediator) {
        super(mediator);
    }

    public void doB() {
        System.out.println("组件2执行B操作。");
        mediator.notify(this, "B");
    }
    public void doC() {
        System.out.println("组件2执行C操作。");
    }
}